#ifndef _BSP_CONFIG_H
#define _BSP_CONFIG_H
#include "drv_gpio.h"

#define APP_VERSION_MAJOR   0
#define APP_VERSION_MINOR   1

/*GPIO 配置 */
#define PIN_LED1    GET_PIN(B, 1)
#define PIN_LED2    GET_PIN(B, 2)
#define PIN_LED3    GET_PIN(B, 3)

/*串口配置*/
#define RT_USING_UART0
#define RT_USING_UART1
#define RT_USING_UART2
#define DEBUG_UART_PORT UART2
/*串口接收缓冲区大小*/
#define UART0_RXBF_SIZE  32
#define UART1_RXBF_SIZE  32
#define UART2_RXBF_SIZE  32
/*串口引脚*/
//uart0
#define UART0_TX_PORT       GPIOA
#define UART0_TX_PIN        GPIO_PIN_4
#define UART0_RX_PORT       GPIOA
#define UART0_RX_PIN        GPIO_PIN_3
#define UART0_TX_AF         GPIO_AF10_LPUART
#define UART0_RX_AF         GPIO_AF6_LPUART
//uart1
#define UART1_TX_PORT       GPIOB
#define UART1_TX_PIN        GPIO_PIN_6
#define UART1_RX_PORT       GPIOB
#define UART1_RX_PIN        GPIO_PIN_7
#define UART1_TX_AF         GPIO_AF4_USART1
#define UART1_RX_AF         GPIO_AF4_USART1
//uart2
#define UART2_TX_PORT       GPIOA
#define UART2_TX_PIN        GPIO_PIN_9
#define UART2_RX_PORT       GPIOA
#define UART2_RX_PIN        GPIO_PIN_10
#define UART2_TX_AF         GPIO_AF10_USART2
#define UART2_RX_AF         GPIO_AF10_USART2
/*串口波特率*/
#define UART0_CONFIGURE     \
        {                   \
            115200,         \
            8,              \
            1,              \
            LPUART_PE_NO,   \
            UART0_RXBF_SIZE,\
        }

#define UART1_CONFIGURE     \
        {                   \
            115200,         \
            USART_WL_8B,    \
            USART_STPB_1,   \
            USART_PE_NO,    \
            UART1_RXBF_SIZE,\
        }

#define UART2_CONFIGURE     \
        {                   \
            115200,         \
            USART_WL_8B,    \
            USART_STPB_1,   \
            USART_PE_NO,    \
            UART2_RXBF_SIZE,\
        }

#endif
